/**
 * Created by Administrator on 2017/3/11.
 */
import React from 'react';
class NoticeItem extends React.Component{
    render(){
        let item=this.props.item;
        return(
            <li>
                <a href="#"><span className="title">{item.title}</span><span className="time">[{item.time}]</span></a>
            </li>
        )
    }
}

export default class NoticeBox extends React.Component{
    render(){
        let items=this.props.items.list;
        return(
            <div className="notice">
                <div className="notice_top">
                    <h2 className="notice_title">{this.props.items.title}</h2>
                    <span><a href="#"><img src={this.props.items.img}/></a></span>
                </div>

                <div className="notice_list">
                    <ul className="">
                        {
                            items.map(function (item,idx) {
                                return <NoticeItem item={item} key={'item'+idx}/>
                            })
                        }
                    </ul>
                </div>
            </div>
        )
    }
}
